import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  server: {
    port: 3000,
    cors: true,
    headers: {
      'Access-Control-Allow-Origin': '*'
    },
    hmr: false  // 完全禁用 HMR
  },
  plugins: [
    vue({
      template: {
        compilerOptions: {
          isCustomElement: tag => tag.includes('micro-app')
        }
      }
    })
  ],
  build: {
    target: 'esnext',
    cssTarget: 'chrome80',
    minify: false
  }
})